<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>文档标题</title>
    <script>
      function rev(char) {
        const result = [];
        for (let i = 0; i < char.length; i++) {
          result[char.length - 1 - i] = char[i];
        }
        return result.join("");
      }

      console.log(rev("spring"));
    </script>
</head>
<body>
<h1>我的第一个HTML页面</h1>
<p>我的第一个段落。</p>
</body>
</html>
